package com.ym.medical.enums;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.util.StdConverter;
import com.ym.common.annotations.EnumDescription;
import com.ym.common.constant.DictEnum;

/**
 * 咨询室状态
 */
@EnumDescription("咨询室状态")
public enum CounsellingRoomStateEnum implements DictEnum {

	//--------------------start-----------------


	/**
	 * 未回复
	 */
	DID_NOT_RETURN("01","未回复"),

	/**
	 * 已答复
	 */
	HAVE_A_REPLY("02","已答复"),
	/**
	 * 已结束
	 */
	HAS_ENDED("03","已结束"),
	/**
	 * 未总结
	 */
	NOT_TO_SUMMARIZE("04","未总结"),
	/**
	 * 已总结
	 */
	HAVE_SUMMARIZED("05","已总结"),

	//--------------------end-------------------
	;
	private String key;

	private String value;

	CounsellingRoomStateEnum(String key, String value) {
		this.key = key;
		this.value = value;
	}

	@Override
	public String getKey() {
		return this.key;
	}

	@Override
	public String getValue() {
		return this.value;
	}


	/**
	 * 序列化使用
	 */
	public static class Covert extends StdConverter<String, JSONObject> {
		@Override
		public JSONObject convert(String value) {
			return DictEnum.valueOfJson(CounsellingRoomStateEnum.class, value);
		}
	}
}
